home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / DynSoftRigidBodyMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  4.9 KB  |  153 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  13 April 1997
  22. // Author:         gf
  23. //
  24. //
  25. //  Procedure Name:
  26. //      DynSoftRigidBodyMenu
  27. //
  28. //  Description:
  29. //        Create the DYNAMICS->Soft/RigidBody menu
  30. //
  31. //  Input Arguments:
  32. //      parent to parent the menu to.
  33. //
  34. //  Return Value:
  35. //      None.
  36. //
  37.  
  38.  
  39. global proc DynSoftRigidBodyMenu( string $parent )
  40. {
  41.     setParent -m $parent;
  42.     if( `menu -q -ni $parent` != 0 ) {
  43.         //
  44.         //    Menu is built already - just return
  45.         //
  46.         return;
  47.     }
  48.  
  49.     menuItem -l "Create Active Rigid Body" 
  50.         -annotation "Create Active Rigid Body: Select geometry objects to create rigid bodies"
  51.         -c "CreateActiveRigidBody" 
  52.         -dmc "performDynamics 2 ActiveRigid 2"
  53.         -i "rigid.xpm"
  54.         createActiveRigidBodyItem;
  55.         menuItem -optionBox true -i "rigid.xpm"
  56.             -annotation "Create Active Rigid Body Option Box"
  57.             -l "Create Active Rigid Body Option Box"
  58.             -c "CreateActiveRigidBodyOptions"
  59.             createActiveRigidBodyDialogItem;
  60.  
  61.     menuItem -l "Create Passive Rigid Body" 
  62.         -annotation "Create Passive Rigid Body: Select geometry objects to create rigid bodies"
  63.         -c "CreatePassiveRigidBody" 
  64.         -dmc "performDynamics 2 PassiveRigid 2"
  65.         -i "rigidPassive.xpm"
  66.         createPassiveRigidBodyItem;
  67.         menuItem -optionBox true -i "rigidPassive.xpm"
  68.             -annotation "Create Passive Rigid Body Option Box"
  69.             -l "Create Passive Rigid Body Option Box"
  70.             -c "CreatePassiveRigidBodyOptions"
  71.             createPassiveRigidBodyDialogItem;
  72.  
  73.     menuItem -l "Create Constraint" 
  74.         -annotation "Create Constraint: Select rigid bodies to be constrained"
  75.         -c "CreateConstraint" 
  76.         -dmc "performDynamics 2 Constrain 2"
  77.         -i "constraint.xpm"
  78.         createConstraintItem;
  79.         menuItem -optionBox true -i "constraint.xpm"
  80.             -annotation "Create Constraint Option Box"
  81.             -l "Create Constraint Option Box"
  82.             -c "CreateConstraintOptions"
  83.             createConstraintDialogItem;
  84.  
  85.     menuItem -divider true;
  86.  
  87.     menuItem -l "Set Active Key"
  88.         -annotation "Set Active Key: Select one or more active rigid bodies"
  89.         -c "SetActiveKey" 
  90.         setActiveKey;
  91.     menuItem -l "Set Passive Key"
  92.         -annotation "Set Passive Key: Select one or more passive rigid bodies"
  93.         -c "SetPassiveKey" 
  94.         setPassiveKey;
  95.  
  96.     menuItem -divider true;
  97.  
  98.     menuItem -l "Break Rigid Body Connections"
  99.         -annotation "Break Rigid Body Connections: Break connections on selected rigid bodies that have been keyframed or baked."
  100.         -c "BreakRigidBodyConnection" 
  101.         breakConnections;
  102.  
  103.     menuItem -divider true;
  104.  
  105.     menuItem -l "Create Soft Body" 
  106.         -annotation "Create Soft Body: Select geometry object(s) to create soft bodies"
  107.         -c "CreateSoftBody"
  108.         -dmc "performDynamics 2 Soft 2"
  109.         -i "soft.xpm"
  110.          createSoftBodyItem;
  111.         menuItem -optionBox true -i "soft.xpm"
  112.             -annotation "Create Soft Body Option Box"
  113.             -l "Create Soft Body Option Box"
  114.             -c "CreateSoftBodyOptions"
  115.             createSoftBodyDialogItem;
  116.  
  117.     menuItem -l "Create Springs" 
  118.         -annotation "Create Springs: Select particle(s) to add springs"
  119.         -c "CreateSpring"
  120.         -dmc "performDynamics 2 Spring 2"
  121.         -i "spring.xpm"
  122.         createSpringItem;
  123.         menuItem -optionBox true -i "spring.xpm"
  124.             -annotation "Create Springs Option Box"
  125.             -l "Create Springs Option Box"
  126.             -c "CreateSpringOptions"
  127.             createSpringDialogItem;
  128.  
  129.     // Artian Paint Soft Body Goal tool.
  130.     menuItem -l "Paint Soft Body Weights Tool"
  131.         -image "attrPaint.xpm"
  132.         -annotation "Paint Soft Body Weights Tool: paint goal weights on selected particle node."
  133.         -c "artAttrToolScript 4 \"particle\"" softBodyPaintItem;
  134.         menuItem -optionBox true
  135.             -image "attrPaint.xpm"
  136.             -annotation "Paint Soft Body Weights Tool: paint goal weights on selected particle node."
  137.             -l "Paint Soft Body Weights Tool Option Box"
  138.             -c "artAttrToolScript 3 \"particle\"" softBodyPaintDialogItem;
  139.  
  140.  
  141.     int $dynamicsIsLicensed = `licenseCheck -mode "edit" -type "fx"`;
  142.     if (!$dynamicsIsLicensed)
  143.     {
  144.          menuItem -e -enable false createSoftBodyItem;
  145.          menuItem -e -enable false createSoftBodyDialogItem;
  146.          menuItem -e -enable false createSpringItem;
  147.          menuItem -e -enable false createSpringDialogItem;
  148.     }
  149. }
  150.  
  151.  
  152.  
  153.